
<div class="content cart" id="Cart">
	<div class="grid-6">
	<?php if (!empty($list)): ?>
		<ul>
			<li class="header">
				<span class="description"><?php __('Descripción'); ?></span>
				<span class="price"><?php __('Precio'); ?></span>
				<span class="quantity"><?php __('Cantidad'); ?></span>
				<span class="subtotal"><?php __('Total'); ?></span>
			</li>
		<?php
			$total = 0;
			foreach($list AS $row):
				$price = $row['Product']['price'];
				$total+= $subtotal = $price;
		?>
			<li>
				<span class="description"><?php echo $html->link($row['ProductDescription']['name'], array('shop' => $this->params['shop'], 'controller' => 'products', 'action' => 'details', $row['ProductDescription']['slug'])); ?></span>
				<span class="price"><?php echo $row['Currency']['code'] . $number->format($row['Product']['price'], array('before' => $row['Currency']['symbol_left'], 'after' => $row['Currency']['symbol_right'], 'places' => $row['Currency']['decimal_places'], 'decimals' => $row['Currency']['decimals'], 'thousands' => $row['Currency']['thousands'], 'escape' => false)); ?></span>
				<span class="quantity"><?php echo $form->input('Product.' . $row['Product']['id'] . '.unit', array('type' => 'text', 'div' => false, 'label' => false, 'default' => 1, 'size' => 2)); ?></span>
				<span class="subtotal"><?php echo $row['Currency']['code'] . $number->format($price, array('before' => $row['Currency']['symbol_left'], 'after' => $row['Currency']['symbol_right'], 'places' => $row['Currency']['decimal_places'], 'decimals' => $row['Currency']['decimals'], 'thousands' => $row['Currency']['thousands'], 'escape' => false)); ?></span>
				<?php echo $html->link(__('Eliminar', true), array('shop' => $this->params['shop'], 'controller' => 'cart', 'action' => 'delete', base64_encode($row['Product']['id'])), array('class' => 'delete')); ?>
			</li>
		<?php endforeach; ?>
		</ul>
		<div class="total">
			<?php echo String::insert(__('Total a pagar: :amount', true), array('amount' => $row['Currency']['code'] . $number->format($total, array('before' => $row['Currency']['symbol_left'], 'after' => $row['Currency']['symbol_right'], 'places' => $row['Currency']['decimal_places'], 'decimals' => $row['Currency']['decimals'], 'thousands' => $row['Currency']['thousands'], 'escape' => false)))); ?>
		</div>
	<?php else: ?>
		<div>
			<?php __('No existen productos agregados al carrito.'); ?>
		</div>
	<?php endif; ?>
	
		<ul>
			<li><?php echo $html->link(__('Seguir comprando', true), array('shop' => $this->params['shop'], 'controller' => 'products', 'action' => 'collections')); ?></li>
			<li><?php echo $html->link(__('Solicitar cotización', true), array('shop' => $this->params['shop'], 'controller' => 'cart', 'action' => 'step', 2)); ?></li>
			<li><?php echo $html->link(__('Comprar', true), array('shop' => $this->params['shop'], 'controller' => 'cart', 'action' => 'buy', 2)); ?></li>
		</ul>
	</div>
	<div class="grid-3">
		<div class="adsense300x300">
			Adsense
		</div>
	</div>
<!-- 
	
<?php if ($this->Session->check('Auth')): ?>
	<?php echo $html->link(__('Guardar en mi Lista', true), array('shop' => $this->params['shop'], 'controller' => 'cart', 'action' => 'list')); ?>
	
	
<?php else: ?>

	<div class="login">
		login
	</div>	

<?php endif; ?>
	
	<div class="grid-9">
		<h4><?php __('Formas de Pago'); ?></h4>
		<ul>
			<li><?php __('DineroMail'); ?> <p class="help"><?php __('Para pagar mediante Dineromail debes ser usuario registrado de Dineromail.com.'); ?></p></li>
			
			<li></li>
		</ul>
	</div>
</div>

<form action='https://chile.dineromail.com/Shop/Shop_Ingreso.asp' method='post'>
	<input type='hidden' name='NombreItem' value='test'>
	<input type='hidden' name='TipoMoneda' value='1'>
	<input type='hidden' name='PrecioItem' value='100000.00'>
	<input type='hidden' name='image_url' value='http://www.google.cl/logos/classicplus.png'>
	<input type='hidden' name='E_Comercio' value='<?php //echo Configure::read('Shop.Configuration.dm_comercio_id'); ?>'>
	<input type='hidden' name='E_Comercio' value='192894'>
	<input type='hidden' name='NroItem' value='456789'>
	<input type='hidden' name='DireccionExito' value='http://minicatalogo.net/exito'>
	<input type='hidden' name='DireccionFracaso' value='http://minicatalogo.net/error'>
	<input type='hidden' name='DireccionEnvio' value='0'>
	<input type='hidden' name='Mensaje' value='0'>
	<input type='hidden' name='MediosPago' value='4,5,6,21,23,2,7'>
	<input type='submit' src='https://chile.dineromail.com/imagenes/botones/pagar-medios_c.gif' border='0' name='submit' alt='Pagar con DineroMail'>
</form>
 -->

<script type="text/javascript" charset="utf-8">
	(function(){
		
	})(jQuery);
</script>